<?php
/*------------------------------------------------------------------------
# com_ilike - XIPAT Like Article Component
# version: 1.0
# ------------------------------------------------------------------------
# author    Duong Tien Dung - www.xipat.com
# copyright Copyright (C) 2013 www.xipat.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.xipat.com
# Technical Support:  http://www.xipat.com/support.html
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>
<script type="text/javascript">
    Joomla.submitbutton = function(task)
    {
        if (task == 'xplike.cancel' || document.formvalidator.isValid(document.id('xplike-form'))) {
            Joomla.submitform(task, document.getElementById('xplike-form'));
        }
    }
</script>
<link type="text/css" rel="stylesheet" href="<?php echo JUri::base().'components/com_ilike/html/css/xplike.css'; ?>" />  
<form action="<?php echo JRoute::_('index.php?option=com_ilike&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="xplike-form" class="form-validate">
    <div style="width:60%;float: left;">
        <fieldset class="adminform">
            <legend><?php echo empty($this->item->id) ? JText::_('COM_XP_LIKE_NEW_XPLIKE') : JText::sprintf('COM_XP_LIKE_XPLIKE_DETAILS', $this->item->id); ?></legend>
            <ul class="adminformlist">
                
                <li><?php echo $this->form->getLabel('id'); ?>
                <?php echo $this->form->getInput('id'); ?></li>
                                
                <li><?php echo $this->form->getLabel('content_id'); ?>
                <?php echo $this->form->getInput('content_id'); ?></li>                   
                
                <li><?php echo $this->form->getLabel('likes'); ?>
                <?php echo $this->form->getInput('likes'); ?></li>
                
                <li><?php echo $this->form->getLabel('component'); ?>
                <?php echo $this->form->getInput('component'); ?></li>
                
                <li><?php echo $this->form->getLabel('dislikes'); ?>
                <?php echo $this->form->getInput('dislikes'); ?></li>

            </ul>
            <div class="clr"> </div>

        </fieldset>
    </div>

<div style="width: 40%; float: left;">
    <?php echo JHtml::_('sliders.start','xplike-sliders-'.$this->item->id, array('useCookie'=>1)); ?>

    <?php echo JHtml::_('sliders.panel',JText::_('COM_XP_LIKE_GROUP_LABEL_PUBLISHING_DETAILS'), 'publishing-details'); ?>
        <fieldset class="panelform">
        <ul class="adminformlist">
            <?php foreach($this->form->getFieldset('publish') as $field): ?>
                <li><?php echo $field->label; ?>
                    <?php echo $field->input; ?></li>
            <?php endforeach; ?>
            </ul>
        </fieldset>

    <?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
        <fieldset class="panelform">
            <ul class="adminformlist">
                <?php foreach($this->form->getFieldset('metadata') as $field): ?>
                    <li><?php echo $field->label; ?>
                        <?php echo $field->input; ?></li>
                <?php endforeach; ?>
            </ul>
        </fieldset>

    <?php echo JHtml::_('sliders.end'); ?>
    <input type="hidden" name="task" value="" />
    <?php echo JHtml::_('form.token'); ?>
</div>

<div class="clr"></div>
</form>
